<!--
  @author duanzuocai
  @since 2018/11/12 15:25
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss">
    <title>新增或编辑系统</title>
</head>
<body>

<div class="layui-fluid">

    <!--面包屑-->
    <blockquote class="layui-crumb">
        系统管理>&nbsp;
        <a lay-href="/mc/sys/list.action" lay-text="系统管理" th:text="系统管理">系统管理</a>
        >&nbsp;
        <span th:text="${sys.sysId == 0 ? '添加系统' : sys.sysName }"></span>
    </blockquote>

    <div class="layui-card">
        <form method="post" action="" class="layui-form" lay-filter="zmn-sys-form">
            <input type="hidden" name="sysId" th:value="${sys.sysId}"/>

            <div class="layui-card-header" style="margin-top:10px;"><b>基本信息</b></div>
            <div class="layui-split">&nbsp;</div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">系统名称</label>
                <div class="layui-form-mid layui-word-aux">
                    <input type="text" lay-verify="required" name="sysName" class="layui-input" th:value="${sys.sysName}" maxlength="25"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">系统链接</label>
                <div class="layui-input-inline" style="width:400px;">
                    <input type="text" name="url" th:value="${sys.url}" autocomplete="off" class="layui-input" maxlength="150"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">logo路径</label>
                <div class="layui-input-inline" style="width:400px;">
                    <input type="text" name="logoSrc" th:value="${sys.logoSrc}" autocomplete="off" class="layui-input" maxlength="100"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">备注</label>
                <div class="layui-input-inline" style="width:400px;">
                    <input type="text" name="remark" th:value="${sys.remark}" autocomplete="off" class="layui-input" maxlength="100"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">责任人ID</label>
                <div class="layui-input-inline" style="width:400px;">
                    <input type="text" name="ownerId" th:value="${sys.ownerId}" autocomplete="off" lay-verify="num" class="layui-input" maxlength="10"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">责任人</label>
                <div class="layui-input-inline" style="width:400px;">
                    <input type="text" name="owner" th:value="${sys.owner}" autocomplete="off" class="layui-input" maxlength="10"/>
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">排序</label>
                <div class="layui-input-inline" style="width:240px;">
                    <input type="text" lay-verify="sort" name="sort" th:value="${sys.sort}" autocomplete="off" class="layui-input" maxlength="6"/>
                </div>
                <div class="layui-form-mid layui-word-aux">越小越靠前</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">状态</label>
                <div class="layui-input-inline">
                    <select name="status" lay-verify="required">
                        <option th:each="status:${statuses}" th:value="${status.key}" th:text="${status.value}" th:selected="${status.key == sys.status}">
                    </select>
                </div>
            </div>
            <zmn th:if="${sys.sysId > 0}">
                <div class="layui-card-header"><b>其他信息</b></div>
                <div class="layui-split">&nbsp;</div>
                <div class="layui-form-item layui-form-item-xs">
                    <label class="layui-form-label">修改人/时间</label>
                    <div class="layui-input-block">
                        <div class="layui-form-mid layui-word-aux" th:text="${sys.updater} + '&nbsp;/&nbsp;' + ${#dates.format(sys.updateTime, 'yyyy-MM-dd HH:mm:ss')}">修改人/时间</div>
                    </div>
                </div>
                <div class="layui-form-item layui-form-item-xs">
                    <label class="layui-form-label">创建人/时间</label>
                    <div class="layui-input-block">
                        <div class="layui-form-mid layui-word-aux" th:text="${sys.creater} + '&nbsp;/&nbsp;' + ${#dates.format(sys.createTime, 'yyyy-MM-dd HH:mm:ss')}">创建人/时间</div>
                    </div>
                </div>
            </zmn>

            <div class="layui-split">&nbsp;</div>
            <div class="layui-form-item layui-layout-admin">
                <div class="layui-input-block">
                    <div class="layui-footer" style="left: 0;">
                        <button class="layui-btn" lay-submit="" lay-filter="zmn-sys-form-submit" th:if="${#authPermit.checkPermit('/mc/sys/addEdit.action')}">保存</button>
                        <button class="layui-btn layui-btn-primary" onclick="parent.layui.element.tabDelete('layadmin-layout-tabs', window.location.pathname + window.location.search)">取消</button>
                    </div>
                </div>
            </div>

        </form>
    </div>
</div>

<script type="text/javascript" th:inline="javascript">

    layui.config({
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        art_sys_detail: "mc/sys/zmn.art.sys.edit",
    }).use(['index', 'art_sys_detail']);

</script>
</body>
</html>